<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>最高位数字</title>
		<script type="text/javascript">
			var a=prompt("输入一个正整数：","");
			document.write(a.substr(0,1))
			//var max=0;
			//if(isNaN(a)){
				//alert("不是一个数字");
		//	}
			// else  {
			 //while(max>=10){alert(max=max/10)}
			
			//}
			//document.write(parseInt(max))
		</script>
	</head>
	<body>
	</body>
</html>
